﻿using System;

namespace _35_显式实现接口_继承与多态
{
    class Program
    {
        static void Main(string[] args)
        {
            NetworkManager xx2 = new NetworkManager();

            //要下载，只能通过IDownloader接口类型的变量来访问
            IDownloader dl = xx2;
            dl.Start();

            //要上传，也只能通过IUploader接口类型的变量来访问
            IUploader ds = xx2;
            ds.Start();
        }
    }

    interface IDownloader
    {
        void Start();
    }

    interface IUploader
    {
        void Start();

    }

    class NetworkManager:IDownloader,IUploader
    {
        void IDownloader.Start()
        {
            Console.WriteLine("正在下载，请销等...");
        }
        void IUploader.Start()
        {
            Console.WriteLine("内容上传传中，请稍等...");
        }
    }
}
